home *** CD-ROM | disk | FTP | other *** search
/ Champak 49 / Volume 49 - JOGO DISK .iso / Games / freezelifter.swf / scripts / DefineSprite_245 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-10-01  |  631 b   |  30 lines

  1. function checkLand()
  2. {
  3.    dest_x = _root.chopper._x;
  4.    var _loc1_ = dest_x - (_X + _parent._x);
  5.    var _loc2_ = _root.chopper._y - (_Y + _parent._y);
  6.    if(Math.abs(_loc1_) < 100 && Math.abs(_loc2_) < 5)
  7.    {
  8.       if(_loc1_ < 0)
  9.       {
  10.          move_looper.x_speed = -1;
  11.          _xscale = 60;
  12.       }
  13.       else
  14.       {
  15.          move_looper.x_speed = 1;
  16.          _xscale = -60;
  17.       }
  18.       gotoAndStop(2);
  19.       move_looper.gotoAndPlay(2);
  20.    }
  21.    else
  22.    {
  23.       gotoAndStop(1);
  24.       move_looper.x_speed = 0;
  25.       move_looper.gotoAndStop(1);
  26.    }
  27. }
  28. stop();
  29. n = Number(mbsubstring(_name,8,2));
  30.